-- GENERATED SPELL FOR [Dalaran Apprentice] --


function spell0_1867(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_1867', 0, 1)
end

function spell1_1867(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(13322,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1867', 5000, 1)
end

function Sorts_1867(pUnit, Event)
local choix_sorts_1867 = math.random(0, 1)
if choix_sorts_1867 == 0 then
pUnit:RegisterEvent('spell0_1867', 1, 1)
end
if choix_sorts_1867 == 1 then
pUnit:RegisterEvent('spell1_1867', 1, 1)
end
end

function mob1867_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1867', math.random(1500, 3000), 1)
end

function mob1867_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1867_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1867_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1867, 1, 'mob1867_Action')
RegisterUnitEvent(1867, 2, 'mob1867_Leave')
RegisterUnitEvent(1867, 3, 'mob1867_Kill')
RegisterUnitEvent(1867, 4, 'mob1867_Die')
